//*************************************
//The Siege of Copperpeak - Data Script
//*************************************

beginscendatascript;


//*******************
//***TERRAIN TYPES***
// (431-449 are safe from te_can_look_at bug) 
// (also 452-455, 460-468, 472-484, 487-489, 495-end)
//Index:
// *Utility Terrains
// *Buildings
// *Outdoor Objects
// *Trees
// *Roads & Walkways
// *Town Objects


//******************
//*UTILITY TERRAINS*

begindefineterrain 390; //Invisible movement blocker
	import = 300; //a large rock
	te_which_sheet = 713;
	te_which_icon = 4; //emptiness
	te_can_look_at = 0;
	te_ed_which_sheet = 681;
	te_ed_which_icon = 20; //emptiness

begindefineterrain 206; //fixed beds
	import = 204;
	te_which_sheet = 720;
	te_which_icon = 0;
	te_ed_which_sheet = 682;
	te_ed_which_icon = 90;
	te_special_property = 8;
	te_special_strength = 10;
	te_full_move_block = 0;
begindefineterrain 207;
	te_which_icon = 1;
	te_ed_which_icon = 91;

begindefineterrain 464; //split hill
	import = 74; //grassy hill
	te_which_sheet = 505;
	te_which_icon = 20;
begindefineterrain 465; //split hill
	te_which_icon = 21;
begindefineterrain 466; //split hill
	import = 80;
	te_which_sheet = 505;
	te_which_icon = 22;
begindefineterrain 467; //split hill
	te_which_icon = 23;

begindefineterrain 377; //Fisher's desk
	import = 230;
	te_special_property = 41;
	te_height_adj_pixels = 18;

begindefineterrain 297; //hole w/ stairs (A5)
	import = 284;
	te_which_sheet = 505;
	te_which_icon = 29;


//***********
//*BUILDINGS*

begindefineterrain 326; //Adjust guard tower up
	import = 325; //whatever was right before it
	te_which_icon = 6;
	te_ed_which_icon = 6;
	te_icon_offset_y = -6;
	te_full_move_block = 1;
	te_hidden_town_terrain = 137;
begindefineterrain 327; 
	te_which_sheet = 751;
	te_which_icon = 9;
	te_ed_which_icon = 19;
	te_icon_offset_y = 0;
	te_hidden_town_terrain = -1;
begindefineterrain 331; //Adjust #325 up
	import = 325;
	te_icon_offset_y = -7;
	te_icon_offset_x = -4;
	te_full_move_block = 0;
	te_special_property = 0;
begindefineterrain 332; //Larger house
	import = 325;
	te_which_sheet = 789;
	te_which_icon = 2;
	te_ed_which_sheet = 688;
	te_ed_which_icon = 92;
begindefineterrain 463; //dead village cluster
	import = 325;
	te_which_sheet = 503;
	te_which_icon = 18;
	te_name = "Village";
begindefineterrain 395; //Adjust 395's color
	import = 125;
	te_name = "Watch Tower";
	te_which_sheet = 505;
	te_which_icon = 2;
	te_ed_which_sheet = 686;
	te_ed_which_icon = 72;

begindefineterrain 345; //wall crack
	import = 178; //wall hanging
	te_name = " ";
	te_can_look_at = 0;
	te_draw_on_automap = 0;
	te_which_sheet = 508;
	te_which_icon = 29;
	te_icon_offset_x = 24;
	te_icon_offset_y = -16;
	te_icon_adjust = 0;
begindefineterrain 349; //wall crack
	te_which_icon = 19;
	te_icon_offset_x = -24;
begindefineterrain 346; //wall blast
	te_which_icon = 18;
	te_icon_offset_x = 12;
	te_icon_offset_y = -28;
	te_icon_adjust = 8;
begindefineterrain 347; //higher blast
	te_icon_offset_y = -45;
begindefineterrain 348; //even higher blast
	te_icon_offset_y = -68;
begindefineterrain 350; //mid blast, facing E
	import = 347;
	te_icon_adjust = 32;
	te_which_icon = 28;
	te_icon_offset_x = -12;
begindefineterrain 356; //high blast, facing E
	te_icon_offset_y = -68;

//*****************
//*OUTDOOR OBJECTS*

//Monoliths (Credit to Arancaytar)
begindefineterrain 393;
	import = 303;
	te_name = "Monolith";
	te_which_sheet = 505;
	te_which_icon = 0;
	//te_icon_adjust = 4;
	te_icon_offset_y = -3;
begindefineterrain 394;
	te_which_icon = 1;

//Extra Waterfalls
begindefineterrain 336; //E-W waterfall
	import = 335; //N-S waterfall
	te_which_sheet = 506;
	te_which_icon = 10;
	te_second_icon = 14;
	te_special_property = 44;
begindefineterrain 337; //Corner waterfall piece
	te_which_icon = 0;
	te_second_icon = 4;
	te_special_property = 0;


//Campsites, etc.
begindefineterrain 407; //Abandoned campsite (graphic from Za-Khazi Run)
	import = 405;
	te_name = "Abandoned Camp";
	te_which_sheet = 505;
	te_which_icon = 17;
	te_can_look_at = 1;
begindefineterrain 408; //Woodpiles (graphic from Za-Khazi Run)
	import = 210;
	te_name = "Woodpiles";
	te_which_sheet = 505;
	te_which_icon = 19;
begindefineterrain 409; //Wrecked boat (graphic from Za-Khazi Run)
	import = 300;
	te_can_look_at = 1;
	te_name = "Shipwreck";
	te_which_sheet = 505;
	te_which_icon = 15;
begindefineterrain 397; //Fixing the supply cache
	//Ordinarily, this terrain is broken, and instead will
	// display the lower half of a pine tree.
	import = 141;
	te_name = "Found Supply Cache";
	te_which_sheet = 787;
	te_which_icon = 0;
	te_ed_which_sheet = 688;
	te_ed_which_icon = 70;
	te_out_fight_town_used = -1;


//Siege camps
begindefineterrain 378; //empty camp on S-facing hill
	import = 80; //hill
	te_name = "Hill, Outdoor Camp";
	te_which_sheet = 505;
	te_which_icon = 6;
	te_second_icon = 17;
	te_second_icon_offset_y = -11;
	te_full_move_block = 1;
begindefineterrain 379; //live camp
	te_second_icon = 5;
begindefineterrain 341; //Cart (A5)
	import = 399; //cart
	te_which_sheet = 505;
	te_which_icon = 27;
	te_icon_offset_y = 0;
	te_icon_offset_x = 5;
	te_draw_on_automap = 0;
	te_height_adj_pixels = 11;
	te_special_property = 41;
begindefineterrain 342; //Cart (A5)
	te_which_icon = 28;
	te_icon_offset_x = -5;
begindefineterrain 343; //tent (A5)
	import = 201; //box
	te_name = "Tent";
	te_which_sheet = 505;
	te_which_icon = 25;
	te_draw_on_automap = 0;
	te_can_look_at = 1;
	te_icon_adjust = 0;
begindefineterrain 344; //tent (A5)
	te_which_icon = 26;


//Siege weapons (from A5)
begindefineterrain 340; //ballista!
	import = 126; //boulder
	te_which_sheet = 505;
	te_which_icon = 24;
	te_name = "Ballista";
	te_full_move_block = 1;
	te_draw_on_automap = 0;
	te_icon_offset_y = -5;
	te_icon_adjust = 0;


//Wooden Docks
begindefineterrain 298; //Town version, W-E
	import = 141;
	te_name = "Dock";
	te_which_sheet = 505;
	te_which_icon = 10;
	te_ed_which_sheet = 684;
	te_ed_which_icon = 12;
	te_is_bridge = 1;
	te_is_road = 1;
	te_draw_on_automap = 1;
	te_out_fight_town_used = 1016;
begindefineterrain 299; //Town version, S-N
	te_which_icon = 11;
	te_ed_which_icon = 13;
begindefineterrain 452; //Outdoor version, W edge
	import = 298; //docks
	te_name = "Docks";
	te_which_sheet = 505;
	te_which_icon = 12;
	te_icon_adjust = 0;
	te_is_bridge = 0;
begindefineterrain 453; //Outdoor version, N edge
	import = 299; //docks
	te_name = "Docks";
	te_which_sheet = 505;
	te_which_icon = 13;
	te_icon_adjust = 0;
	te_is_bridge = 0;
begindefineterrain 454; //Outdoor version, E edge
	import = 452;
	te_icon_offset_y = 5;
	te_icon_offset_x = 9;
begindefineterrain 455; //Outdoor version, S edge
	import = 453;
	te_icon_offset_y = 5;
	te_icon_offset_x = -9;
begindefineterrain 446; //outdoor dock + hut
	import = 452;
	te_which_icon = 14;

//Ships
begindefineterrain 485; //North-facing ship
	import = 300; //A rock
	te_name = "Ship";
	te_draw_on_automap = 0;
	te_which_sheet = 507;
	te_which_icon = 8;
	te_icon_offset_x = 25;
	te_icon_offset_y = -17;
	te_second_icon = 4;
begindefineterrain 486; //North-facing stern
	te_which_icon = 0;
	te_icon_offset_x = 0;
	te_icon_offset_y = 0;
	te_second_icon = -1;
begindefineterrain 487; //West-facing ship
	te_which_icon = 9;
	te_icon_offset_x = -25;
	te_icon_offset_y = -17;
	te_second_icon = 5;
begindefineterrain 488; //West-facing stern
	te_which_icon = 1;
	te_icon_offset_x = 0;
	te_icon_offset_y = 0;
	te_second_icon = -1;
begindefineterrain 489; //South-facing ship
	te_which_icon = 2;
	te_icon_offset_x = 25;
	te_icon_offset_y = -17;
	te_second_icon = 6;
begindefineterrain 490; //South-facing bow
	te_which_icon = 10;
	te_icon_offset_x = 0;
	te_icon_offset_y = 0;
	te_second_icon = -1;
begindefineterrain 491; //East-facing ship
	te_which_icon = 3;
	te_icon_offset_x = -25;
	te_icon_offset_y = -17;
	te_second_icon = 7;
begindefineterrain 492; //East-facing bow
	te_which_icon = 11;
	te_icon_offset_x = 0;
	te_icon_offset_y = 0;
	te_second_icon = -1;


//Sand Dunes
begindefineterrain 472;
	import = 90;
	te_which_sheet = 500;
	te_which_icon = 20;
	te_name = "Dune";
begindefineterrain 473;
	te_which_icon = 21;
	te_ed_which_icon = 53;
	te_special_property = 20;
begindefineterrain 474;
	te_which_icon = 22;
	te_ed_which_icon = 54;
	te_special_property = 21;
begindefineterrain 475;
	te_which_icon = 23;
	te_ed_which_icon = 55;
	te_special_property = 22;
begindefineterrain 476;
	te_which_icon = 24;
	te_ed_which_icon = 56;
	te_special_property = 23;
begindefineterrain 477;
	te_which_icon = 25;
	te_ed_which_icon = 57;
	te_special_property = 24;
begindefineterrain 478;
	te_which_icon = 26;
	te_ed_which_icon = 58;
	te_special_property = 25;
begindefineterrain 479;
	te_which_icon = 27;
	te_ed_which_icon = 59;
	te_special_property = 26;
begindefineterrain 480;
	te_which_icon = 28;
	te_ed_which_icon = 60;
	te_special_property = 27;
begindefineterrain 481;
	te_which_icon = 29;
	te_ed_which_icon = 61;
	te_special_property = 28;
begindefineterrain 482;
	te_which_icon = 30;
	te_ed_which_icon = 62;
	te_special_property = 29;
begindefineterrain 483;
	te_which_icon = 31;
	te_ed_which_icon = 63;
	te_special_property = 30;


//*******
//*TREES*

//Town-sized trees (Credit - Joaquin Soto)
begindefineterrain 150; //Palm tree 1
	import = 153;
	te_which_sheet = 501;
	te_which_icon = 0;
	te_icon_offset_y = -5;
begindefineterrain 151; //Palm tree 2
	te_which_icon = 1;
	te_icon_offset_y = -5;
	te_icon_offset_x = 5;
begindefineterrain 152; //Palm tree 3
	te_which_icon = 2;
	te_icon_offset_y = -6;
	te_icon_offset_x = -8;
begindefineterrain 153; //Spiky tree 1
	te_which_icon = 3;
	te_icon_offset_y = -5;
	te_icon_offset_x = 0;
begindefineterrain 154; //Spiky tree 2
	te_which_icon = 4;

//Town-size trees, 2-icon (Credit - Enraged Slith)
begindefineterrain 147;
	import = 148;
	te_which_sheet = 501;
	te_which_icon = 8;
	te_icon_offset_y = -5;
	te_second_icon = 9;
	te_second_icon_offset_y = -60;
begindefineterrain 148;
	te_which_icon = 18;
	te_second_icon = 19;
begindefineterrain 149;
	te_which_icon = 28;
	te_second_icon = 29;

//Outdoor-sized trees
begindefineterrain 431;
	te_which_icon = 10;
	te_name = "Trees";
	te_icon_adjust = 0;
	te_icon_offset_y = 0;
	te_second_icon = -1;
	te_full_move_block = 1;
begindefineterrain 432;
	te_which_icon = 11;
begindefineterrain 433;
	te_which_icon = 12;
begindefineterrain 434;
	te_which_icon = 13;
begindefineterrain 435;
	te_which_icon = 14;
begindefineterrain 436;
	te_which_icon = 15;
begindefineterrain 437;
	te_which_icon = 16;
begindefineterrain 438;
	te_which_icon = 17;
begindefineterrain 439;
	te_which_icon = 26;
begindefineterrain 440;
	te_which_icon = 27;
begindefineterrain 441;
	te_which_icon = 20;
begindefineterrain 442;
	te_which_icon = 21;
begindefineterrain 444;
	te_which_icon = 23;
begindefineterrain 445;
	te_which_icon = 24;

//Shrubs (Geneforged)
begindefineterrain 144;
	import = 143;
	te_name = "Shrub";
	te_which_sheet = 505;
	te_which_icon = 7;
	te_ed_which_sheet = 688;
	te_ed_which_icon = 75;
	te_out_fight_town_used = 1013;
begindefineterrain 145;
	te_which_icon = 8;
	te_ed_which_icon = 76;
begindefineterrain 146;
	te_which_icon = 9;
	te_ed_which_icon = 77;

//More Shrubs (A5)
begindefineterrain 304; //larger shrub
	te_which_icon = 3;
	te_draw_on_automap = -1;
begindefineterrain 305; //smaller shrub
	te_which_icon = 4;

//Tree Slopes
begindefineterrain 495;
	import = 74;
	te_which_sheet = 501;
	te_which_icon = 30;
	te_name = "Hill, Trees";
	te_second_icon = 27;
	te_second_icon_offset_y = -9;
	te_second_icon_offset_x = 2;
	te_full_move_block = 1;
begindefineterrain 496;
	import = 75;
	te_which_sheet = 501;
	te_which_icon = 31;
	te_name = "Hill, Trees";
	te_second_icon = 25;
	te_second_icon_offset_y = -1;
	te_second_icon_offset_x = 3;
	te_full_move_block = 1;
begindefineterrain 497;
	import = 76;
	te_which_sheet = 501;
	te_which_icon = 32;
	te_name = "Hill, Trees";
	te_second_icon = 15;
	te_second_icon_offset_y = -11;
	te_second_icon_offset_x = 2;
	te_full_move_block = 1;
begindefineterrain 498;
	import = 77;
	te_which_sheet = 501;
	te_which_icon = 33;
	te_name = "Hill, Trees";
	te_second_icon = 27;
	te_second_icon_offset_y = -11;
	te_second_icon_offset_x = 3;
	te_full_move_block = 1;
begindefineterrain 499;
	import = 78;
	te_which_sheet = 501;
	te_which_icon = 34;
	te_name = "Hill, Trees";
	te_second_icon = 27;
	te_second_icon_offset_y = -11;
	te_second_icon_offset_x = -2;
	te_full_move_block = 1;
begindefineterrain 500;
	import = 79;
	te_which_sheet = 501;
	te_which_icon = 35;
	te_name = "Hill, Trees";
	te_second_icon = 14;
	te_second_icon_offset_y = -1;
	te_second_icon_offset_x = -3;
	te_full_move_block = 1;
begindefineterrain 501;
	import = 80;
	te_which_sheet = 501;
	te_which_icon = 36;
	te_name = "Hill, Trees";
	te_second_icon = 26;
	te_second_icon_offset_y = -9;
	te_second_icon_offset_x = -2;
	te_full_move_block = 1;
begindefineterrain 502;
	import = 81;
	te_which_sheet = 501;
	te_which_icon = 37;
	te_name = "Hill, Trees";
	te_second_icon = 15;
	te_second_icon_offset_y = -1;
	te_second_icon_offset_x = 0;
	te_full_move_block = 1;
begindefineterrain 503;
	import = 82;
	te_which_sheet = 501;
	te_which_icon = 38;
	te_name = "Hill, Trees";
	te_second_icon = 10;
	te_second_icon_offset_y = -11;
	te_second_icon_offset_x = 0;
	te_full_move_block = 1;
begindefineterrain 504;
	import = 83;
	te_which_sheet = 501;
	te_which_icon = 39;
	te_name = "Hill, Trees";
	te_second_icon = 11;
	te_second_icon_offset_y = -13;
	te_second_icon_offset_x = 3;
	te_full_move_block = 1;
begindefineterrain 505;
	import = 84;
	te_which_sheet = 501;
	te_which_icon = 40;
	te_name = "Hill, Trees";
	te_second_icon = 10;
	te_second_icon_offset_y = -11;
	te_second_icon_offset_x = 2;
	te_full_move_block = 1;
begindefineterrain 506;
	import = 85;
	te_which_sheet = 501;
	te_which_icon = 41;
	te_name = "Hill, Trees";
	te_second_icon = 15;
	te_second_icon_offset_y = -13;
	te_second_icon_offset_x = -3;
	te_full_move_block = 1;


//******************
//*ROADS & WALKWAYS*

//Dirt Roads - Credit to Kalinging Song
begindefineterrain 410;
	import = 141;
	te_which_sheet = 504;
	te_which_icon = 0;
	te_ed_which_sheet = 681;
	te_ed_which_icon = 44;
	te_draw_on_automap = 1;
	te_is_road = 1;
	te_out_fight_town_used = -1;
	//te_icon_adjust = 148;
begindefineterrain 411;
	te_which_icon = 1;
	te_ed_which_icon = 45;
begindefineterrain 412;
	te_which_icon = 2;
	te_ed_which_icon = 46;
begindefineterrain 413;
	te_which_icon = 3;
	te_ed_which_icon = 47;
begindefineterrain 414;
	te_icon_offset_x = -1;
	te_which_icon = 4;
	te_ed_which_icon = 48;
begindefineterrain 415;
	te_icon_offset_x = 0;
	te_which_icon = 5;
	te_ed_which_icon = 49;
begindefineterrain 416;
	te_which_icon = 6;
	te_ed_which_icon = 50;
begindefineterrain 417;
	te_which_icon = 7;
	te_ed_which_icon = 51;
begindefineterrain 418;
	te_which_icon = 8;
	te_ed_which_icon = 52;
begindefineterrain 419;
	te_which_icon = 9;
	te_ed_which_icon = 53;
begindefineterrain 420;
	te_which_icon = 10;
	te_ed_which_icon = 54;
//Road slopes
begindefineterrain 86;
	import = 80;
	te_ed_which_sheet = 689;
	te_ed_which_icon = 30;
	te_is_road = 1;
	te_which_sheet = 504;
	te_which_icon = 11;
begindefineterrain 87;
	import = 74;
	te_ed_which_sheet = 689;
	te_ed_which_icon = 31;
	te_is_road = 1;
	te_which_sheet = 504;
	te_which_icon = 12;
begindefineterrain 88;
	import = 76;
	te_ed_which_sheet = 689;
	te_ed_which_icon = 32;
	te_is_road = 1;
	te_which_sheet = 504;
	te_which_icon = 13;
begindefineterrain 89;
	import = 78;
	te_ed_which_sheet = 689;
	te_ed_which_icon = 33;
	te_is_road = 1;
	te_which_sheet = 504;
	te_which_icon = 14;

//Walkways
begindefineterrain 161;
	import = 141;
	te_name = "Walkway";
	te_which_sheet = 504;
	te_which_icon = 15;
	te_ed_which_sheet = 681;
	te_ed_which_icon = 58;
	te_out_fight_town_used = 1025;
begindefineterrain 162;
	te_which_icon = 16;
	te_ed_which_icon = 56;
begindefineterrain 163;
	te_which_icon = 17;
	te_ed_which_icon = 55;
begindefineterrain 164;
	te_which_icon = 18;
	te_ed_which_icon = 57;
begindefineterrain 165;
	te_which_icon = 19;
	te_draw_on_automap = 1;
	te_ed_which_icon = 59;
	te_suppress_floor = 1;


//**************
//*TOWN OBJECTS*

begindefineterrain 177; //Hanging Sign (my graphic)
	import = 214; //normal sign
	te_draw_on_automap = 0;
	te_which_sheet = 506;
	te_which_icon = 34;
	te_icon_offset_y = -19;
	te_icon_offset_x = -7;

//Ship Mast Pieces
begindefineterrain 358; //mast
	import = 279;
	te_draw_on_automap = -1;
	te_name = "Mast";
	te_which_sheet = 506;
	te_which_icon = 35;
	te_second_icon = 36;
	te_cutaway_second_icon = 36;
	te_full_move_block = 0;
	te_icon_offset_y = -25;
	te_second_icon_offset_y = -80;
begindefineterrain 359; //mast pt. 2 - overwrite other big pillar
	te_name = " ";
	te_which_icon = 37;
	te_second_icon = 38;
	te_cutaway_second_icon = 38;
	te_icon_offset_y = -95;
	te_second_icon_offset_y = -150;
begindefineterrain 357; //steering wheel (graphic: Niemand)
	//overwrites big vahnatai crystal pillar
	import = 273; //big pedestal
	te_name = "Ship's Wheel";
	te_which_sheet = 506;
	te_which_icon = 39;
	te_draw_on_automap = 0;
	te_can_look_at = 1;

//Wooden Stairs - Credit to Luz
begindefineterrain 293; 
	import = 289;
	te_name = "Rough Stairs";
	te_which_sheet = 506;
	te_which_icon = 20;
	te_ed_which_icon = 40;
	te_suppress_floor = 0;
	te_icon_adjust = 16;
begindefineterrain 294; 
	te_which_icon = 21;
	te_ed_which_icon = 41;
	te_special_property = 19;
begindefineterrain 295; 
	te_which_icon = 22;
	te_ed_which_icon = 42;
	te_special_property = 21;
begindefineterrain 296; 
	te_which_icon = 23;
	te_ed_which_icon = 43;
	te_special_property = 23;

//Corner Fence Pieces
begindefineterrain 460; // < fence
	import = 0;
	te_which_sheet = 506;
	te_which_icon = 18;
	te_ed_which_sheet = 690;
	te_ed_which_icon = 5;
	te_move_block_w = 1;
	te_move_block_s = 1;
	te_move_block_n = 0;
	te_move_block_e = 0;
begindefineterrain 461; // > fence
	te_which_sheet = 506;
	te_which_icon = 19;
	te_ed_which_icon = 7;
	te_move_block_n = 1;
	te_move_block_e = 1;
	te_move_block_w = 0;
	te_move_block_s = 0;
begindefineterrain 462; // v fence
	te_which_sheet = 506;
	te_which_icon = 8;
	te_ed_which_icon = 6;
	te_move_block_w = 0;
	te_move_block_n = 0;
	te_move_block_s = 1;
	te_move_block_e = 1;
begindefineterrain 463; // ^ fence
	te_which_sheet = 506;
	te_which_icon = 9;
	te_ed_which_icon = 4;
	te_move_block_s = 0;
	te_move_block_e = 0;
	te_move_block_n = 1;
	te_move_block_w = 1;

begindefineterrain 279; //Adjusting #279 up
	import = 278;
	te_name = "Wooden Pillar";
	te_which_sheet = 726;
	te_which_icon = 4;
	te_ed_which_sheet = 682;
	te_ed_which_icon = 64;
	te_full_move_block = 1;
	te_icon_offset_y = -15;
	te_icon_adjust = 0;

begindefineterrain 287; //double ladder
	import = 281;
	te_second_icon = 8;
	te_second_icon_offset_y = -30;

begindefineterrain 274; //adjusting #275 up
	import = 275; //pedestal
	te_icon_offset_y = -15;
	te_full_move_block = 0;
	te_height_adj_pixels = 0;

begindefineterrain 271; //Dead fire (graphic from Bahss)
	import = 209;
	te_name = "Dead Bonfire";
	te_anim_steps = 0;
	te_light_radius = 0;
	te_which_sheet = 505;
	te_which_icon = 16;
	te_swap_terrain = 209;

begindefineterrain 360; //Adjusting #360 up
	import = 361;
	te_which_sheet = 795;
	te_which_icon = 9;
	te_ed_which_sheet = 689;
	te_ed_which_icon = 59;
	te_icon_offset_y = -13;

//Rampart Walls
begindefineterrain 306;
	import = 170; //fence
	te_which_sheet = 506;
	te_which_icon = 28;
	te_ed_which_sheet = 690;
	te_ed_which_icon = 0;
	te_can_look_at = -1;
begindefineterrain 307;
	import = 171;
	te_which_sheet = 506;
	te_which_icon = 29;
	te_ed_which_sheet = 690;
	te_ed_which_icon = 1;
	te_can_look_at = -1;
begindefineterrain 308;
	import = 172;
	te_which_sheet = 506;
	te_which_icon = 28;
	te_ed_which_sheet = 690;
	te_ed_which_icon = 2;
	te_can_look_at = -1;
begindefineterrain 309;
	import = 173;
	te_which_sheet = 506;
	te_which_icon = 29;
	te_ed_which_sheet = 690;
	te_ed_which_icon = 3;
	te_can_look_at = -1;
begindefineterrain 310; // ^ piece
	import = 306;
	te_second_icon = 29;
	te_second_icon_offset_y = -10;
	te_second_icon_offset_x = -21;
	te_move_block_w = 1;
	te_ed_which_icon = 4;
	te_can_look_at = -1;
begindefineterrain 311; // < piece
	import = 307;
	te_second_icon = 28;
	te_move_block_s = 1;
	te_ed_which_icon = 5;
	te_can_look_at = -1;
begindefineterrain 312; // v piece
	import = 309;
	te_second_icon = 28;
	te_move_block_s = 1;
	te_ed_which_icon = 6;
	te_can_look_at = -1;
begindefineterrain 313; // > piece
	import = 306;
	te_second_icon = 29;
	te_move_block_e = 1;
	te_ed_which_icon = 7;
	te_can_look_at = -1;

//Fake 2-floor building pieces
begindefineterrain 421; //window, S side
	import = 170; //fence
	te_name = "Window";
	te_draw_on_automap = -1;
	te_which_sheet = 506;
	te_which_icon = 30;
	te_icon_offset_x = 26;
	te_icon_offset_y = -14;
begindefineterrain 422; //window, E side
	te_which_icon = 31;
	te_icon_offset_x = -26;
begindefineterrain 423; //door, S side
	te_name = "Door";
	te_which_icon = 32;
	te_icon_offset_x = 26;
begindefineterrain 424; //door, E side
	te_which_icon = 33;
	te_icon_offset_x = -26;

//************
//***FLOORS***

begindefinefloor 123;
	clear;
	fl_name = "Walkway";
	fl_which_sheet = 504;
	fl_which_icon = 19;
	fl_ed_which_sheet = 681;
	fl_ed_which_icon = 59;
	fl_shortcut_key = 20;
	fl_out_fight_town_used = 1025;
	fl_is_rough = 1;
begindefinefloor 124; //Keeping the old walkway
	fl_which_sheet = 715;
	fl_which_icon = 9;

begindefinefloor 131; //Deep Ocean
	import = 58;
	fl_which_sheet = 782;
	fl_which_icon = 4;
	fl_name = "Deep Ocean";
	fl_blocked = 1;
	fl_shortcut_key = 14;
	fl_fly_over = 0;


//*****************
//*TROPIC SAND SET*
// (Graphics credit to Luz)

//Coastlines
// Note: These can be difficult to set up in the editor.
//  In my experience, the easiest way to accomplish this
//  is to draw your coastlines with the normal surface
//  graphics, then use the Change Terrain Randomly function
//  to switch them to the tropical version.
begindefinefloor 132;
	import = 59;
	fl_name = "Water";
	fl_which_sheet = 502;
	fl_which_icon = 14;
	fl_ed_which_sheet = 503;
	fl_ed_which_icon = 0;
	fl_shortcut_key = -1;
begindefinefloor 133;
	fl_which_icon = 15;
	fl_ed_which_icon = 1;
begindefinefloor 134;
	fl_which_icon = 16;
	fl_ed_which_icon = 2;
begindefinefloor 135;
	fl_which_icon = 17;
	fl_ed_which_icon = 3;
begindefinefloor 136;
	fl_which_icon = 18;
	fl_ed_which_icon = 4;
begindefinefloor 137;
	fl_which_icon = 19;
	fl_ed_which_icon = 5;
begindefinefloor 138;
	fl_which_icon = 20;
	fl_ed_which_icon = 6;
begindefinefloor 139;
	fl_which_icon = 21;
	fl_ed_which_icon = 7;
begindefinefloor 140;
	fl_which_icon = 22;
	fl_ed_which_icon = 8;
begindefinefloor 141;
	fl_which_icon = 23;
	fl_ed_which_icon = 9;
begindefinefloor 142;
	fl_which_icon = 24;
	fl_ed_which_icon = 10;
begindefinefloor 143;
	fl_which_icon = 25;
	fl_ed_which_icon = 11;
	
//More Coastlines
// Note: These replace the defaults for grassy terrain.
//  They add a little bit of sand to the edge.
begindefinefloor 59;
	import = 57; //standard surface water
	fl_which_sheet = 502;
	fl_which_icon = 0;
	fl_ed_which_sheet = 503;
	fl_ed_which_icon = 0;
	fl_shortcut_key = -1;
begindefinefloor 60;
	fl_which_icon = 1;
	fl_ed_which_icon = 1;
begindefinefloor 61;
	fl_which_icon = 2;
	fl_ed_which_icon = 2;
begindefinefloor 62;
	fl_which_icon = 3;
	fl_ed_which_icon = 3;
begindefinefloor 63;
	fl_which_icon = 4;
	fl_ed_which_icon = 4;
begindefinefloor 64;
	fl_which_icon = 5;
	fl_ed_which_icon = 5;
begindefinefloor 65;
	fl_which_icon = 6;
	fl_ed_which_icon = 6;
begindefinefloor 66;
	fl_which_icon = 7;
	fl_ed_which_icon = 7;
begindefinefloor 67;
	fl_which_icon = 8;
	fl_ed_which_icon = 8;
begindefinefloor 68;
	fl_which_icon = 9;
	fl_ed_which_icon = 9;
begindefinefloor 69;
	fl_which_icon = 10;
	fl_ed_which_icon = 10;
begindefinefloor 70;
	fl_which_icon = 11;
	fl_ed_which_icon = 11;

//Sand-Grass border pieces
// Note: These are best painted by hand, as the editor
//   will not do them automatically.
begindefinefloor 144;
	import = 45;
	fl_name = "Sand";
	fl_which_sheet = 502;
	fl_which_icon = 26;
	fl_ed_which_sheet = 503;
	fl_ed_which_icon = 26;
begindefinefloor 145;
	fl_which_icon = 27;
	fl_ed_which_icon = 27;
begindefinefloor 146;
	fl_which_icon = 28;
	fl_ed_which_icon = 28;
begindefinefloor 147;
	fl_which_icon = 29;
	fl_ed_which_icon = 29;
begindefinefloor 148;
	fl_which_icon = 30;
	fl_ed_which_icon = 30;
begindefinefloor 149;
	fl_which_icon = 31;
	fl_ed_which_icon = 31;
begindefinefloor 150;
	fl_which_icon = 32;
	fl_ed_which_icon = 32;
begindefinefloor 151;
	fl_which_icon = 33;
	fl_ed_which_icon = 33;
begindefinefloor 152;
	fl_which_icon = 34;
	fl_ed_which_icon = 34;
begindefinefloor 153;
	fl_which_icon = 35;
	fl_ed_which_icon = 35;
begindefinefloor 154;
	fl_which_icon = 36;
	fl_ed_which_icon = 36;
begindefinefloor 155;
	fl_which_icon = 37;
	fl_ed_which_icon = 37;

//Basic Sand pieces
begindefinefloor 156; //Pockets of sand on grass
	import = 40; //Plain grass
	fl_name = "Sand";
	fl_which_sheet = 500;
	fl_which_icon = 19;
	fl_ed_which_sheet = 503;
	fl_ed_which_icon = 12;
begindefinefloor 157; //Swamp on sand
	import = 78; //Swamp (inflicts disease)
	fl_name = "Sand";
	fl_which_sheet = 500;
	fl_which_icon = 18;
	fl_ed_which_sheet = 503;
	fl_ed_which_icon = 13;
begindefinefloor 158; //Plain sand
	import = 41;
	fl_name = "Sand";
	fl_which_sheet = 500;
	fl_which_icon = 0;
	fl_shortcut_key = 18; //Editor shortcut = 's'
begindefinefloor 159; //Drift
	fl_which_icon = 1;
	fl_shortcut_key = -1;
begindefinefloor 160; //Drift
	fl_which_icon = 2;
begindefinefloor 161; //Drift
	fl_which_icon = 3;
begindefinefloor 162; //Drift
	fl_which_icon = 4;
begindefinefloor 163; //Drift
	fl_which_icon = 5;

//Misc. Edits & Splices
begindefinefloor 164; //Small grass frill
	import = 38; //Grass frill
	fl_which_sheet = 500;
	fl_which_icon = 6;
	fl_ed_which_sheet = 503;
	fl_ed_which_icon = 38;
	fl_name = "Sand";
begindefinefloor 165; //Small grass frill
	fl_which_icon = 7;
begindefinefloor 166; //Large grass frill
	fl_which_icon = 8;
begindefinefloor 167; //Rocks frill
	import = 43; //Dry ground w/ rocks
	fl_which_sheet = 500;
	fl_which_icon = 10;
	fl_ed_which_sheet = 688;
	fl_ed_which_icon = 6;
	fl_name = "Sand";
begindefinefloor 168; //Rocks frill
	fl_which_icon = 11;
begindefinefloor 169; //Bones frill
	import = 42; //Dry ground w/ bones
	fl_which_sheet = 500;
	fl_which_icon = 9;
	fl_name = "Sand";
begindefinefloor 170; //Small rocks frill
	import = 43;
	fl_which_sheet = 500;
	fl_which_icon = 12;
begindefinefloor 171; //Small rocks frill
	fl_which_icon = 13;



//***********
//***ITEMS***

begindefineitem 445; //Brass key
	import = 375; //rolling pin
	it_name = "Brass Key";
	it_full_name = "Brass Key";
	it_floor_which_sheet = 1035;
	it_floor_which_icon = 6;
	it_inventory_icon = 7;
	it_value = 0;
	it_weight = 5;
	it_junk_item = 0;
	it_identified = 1;

begindefineitem 446; //Survivor's Bracelet
	import = 298; //Priest's Bracelet
	it_name = "Silver Bracelet";
	it_full_name = "Survivor's Bracelet";
	it_ability_1 = 3; //+1 to Resistance
	it_ability_str_1 = 1;
	it_ability_2 = 18; //+1 to Luck
	it_ability_str_2 = 1;
	it_ability_3 = 88; //+10% Chance of Saving Life
	it_ability_str_3 = 2;
	it_value = 3000;

begindefineitem 447; //Darkside Armor
	import = 26; //Leather Armor
	it_full_name = "Darkside Armor";
	it_identified = 1;
	it_protection = 8;
	it_bonus = 4;
	it_value = 100;
	it_icon_adjust = 16;
	it_special_class = 1;
	it_encumbrance = 1;

begindefineitem 448; //Flare Wand (like Morog's Sceptre)
	import = 314; //Leather Sling
	it_name = "Wand";
	it_full_name = "Flare Wand";
	it_damage_per_level = 4;
	it_weapon_skill_used = 11; //Mage Spells
	it_value = 1500;
	it_magic = 1;
	it_weight = 40;
	it_floor_which_sheet = 1045;
	it_floor_which_icon = 9;
	it_inventory_icon = 8;
	it_missile_anim_type = 4;

begindefineitem 449; //Trevahn's body
	import = 152; //pot
	it_name = "Trevahn's Body";
	it_full_name = "Trevahn's Body";
	it_floor_which_sheet = 511;
	it_floor_which_icon = 0;
	it_inventory_icon = 0;
	it_weight = 1800;

begindefineitem 450; //Circlet of Audacity
	import = 213; //torc
	it_name = "Circlet";
	it_full_name = "Circlet of Audacity";
	it_value = 500;
	it_magic = 1;
	it_bonus = 2;
	it_ability_1 = 40; //Up Willpower by 8
	it_ability_str_1 = 8;
	it_ability_2 = 19; //Up Luck by 1
	it_ability_str_2 = 1;

begindefineitem 451; //Trevahn's Ring
	import = 206; //silver ring
	it_full_name = "Trevahn's Ring";
	it_value = 750;
	it_magic = 1;
	it_ability_1 = 5; //Melee Weapons +2
	it_ability_str_1 = 2;
	it_ability_2 = 6; //Pole Weapons +2
	it_ability_str_2 = 2;
	it_ability_3 = 30; //Riposte +2
	it_ability_str_3 = 2;


//***************
//***CREATURES***

begindefinecreature 234; //darkside soldier
	clear;
	cr_level = 11;
	cr_default_script = "loyalist";
	cr_name = "Darkside Warrior";
	cr_default_attitude = 4;
	cr_which_sheet = 1509;
	cr_small_or_large_template = 1;
	cr_summon_class = -1;
	cr_start_item 0 = 447; //Darkside Armor, 100%
	cr_start_item_chance 0 = 100;
	cr_start_item 1 = 220; //Healing Potion, 10%
	cr_start_item_chance 1 = 10;
	cr_start_item 2 = 66; //Iron Spear, 100%
	cr_start_item_chance 2 = 50;
	cr_start_item 3 = 225; //Haste Potion, 10%
	cr_start_item_chance 3 = 10;
	cr_start_item 4 = 67; //Steel Spear, 10%
	cr_start_item_chance 4 = 10;
	cr_start_item 5 = 127; //Iron Small Shield, 60%
	cr_start_item_chance 5 = 60;
	cr_start_item 6 = 141; //Bronze Helmet, 30%
	cr_start_item_chance 6 = 30;
	cr_start_item 7 = 2; //Silver Coins, 15%
	cr_start_item_chance 7 = 15;

begindefinecreature 235; //darkside archer
	import = 124; //rogue archer
	cr_level = 10;
	cr_default_script = "loyalist";
	cr_name = "Darkside Archer";
	cr_what_stat_adjust 0 = 6; //Increase Bows by 2
	cr_amount_stat_adjust 0 = 2;
	cr_summon_class = -1;
	cr_start_item 0 = 447; //Darkside Armor, 100%
	cr_start_item_chance 0 = 100;
	cr_start_item 1 = 90; //Crude Bow, 100%
	cr_start_item_chance 1 = 100;
	cr_start_item 2 = 91; //Ash Bow, 10%
	cr_start_item_chance 2 = 10;
	cr_start_item 3 = 92; //Yew Bow, 1%
	cr_start_item_chance 3 = 1;
	cr_start_item 4 = 101; //Iron Arrows, 100%
	cr_start_item_chance 4 = 100;
	cr_start_item 5 = 51; //Iron Short Sword, 100%
	cr_start_item_chance 5 = 100;
	cr_start_item 6 = 222; //Strength Potion, 10%
	cr_start_item_chance 6 = 10;
	cr_start_item 7 = 137; //Leather Helmet, 20%
	cr_start_item_chance 7 = 20;

begindefinecreature 236; //darkside mage
	clear;
	cr_level = 11;
	cr_default_script = "darkmage";
	cr_name = "Darkside Mage";
	cr_default_attitude = 4;
	cr_which_sheet = 1517;
	cr_icon_adjust = 16;
	cr_small_or_large_template = 1;
	cr_default_strategy = 1;
	cr_summon_class = -1;
	cr_hp_bonus = 60;
	cr_what_stat_adjust 0 = 11; //Up Mage Spells by 13
	cr_amount_stat_adjust 0 = 13;
	cr_what_stat_adjust 1 = 26; //Up Resistance by 3
	cr_amount_stat_adjust 1 = 3;
	cr_start_item 0 = 447; //Darkside Armor, 100%
	cr_start_item_chance 0 = 100;
	cr_start_item 1 = 111; //Sandals, 100%
	cr_start_item_chance 1 = 100;
	cr_start_item 2 = 45; //Crude Dagger, 100%
	cr_start_item_chance 2 = 100;
	cr_start_item 3 = 223; //Energy Potion, 50%
	cr_start_item_chance 3 = 50;
	cr_start_item 4 = 435; //Dust of Shadows, 100%
	cr_start_item_chance 4 = 100;
	cr_start_item 5 = 282; //Wand of Bolts, 40%
	cr_start_item_chance 5 = 40;
	cr_start_item 6 = 448; //Flare Wand, 30%
	cr_start_item_chance 6 = 30;
	cr_start_item 7 = 2; //Silver Coins, 15%
	cr_start_item_chance 7 = 15;
	cr_immunities 0 = 50; //50% Fire resistance
	cr_immunities 1 = 50; //50% Cold resistance
	cr_immunities 2 = 50; //50% Magic resistance
	cr_immunities 3 = 50; //50% Mental resistance
	cr_immunities 4 = 10; //10% Poison/Acid resistance
	cr_immunities 5 = 10; //10% Melee resistance

begindefinecreature 237; //darkside brute
	import = 234; //darkside warrior
	cr_level = 16;
	cr_default_script = "loyalist";
	cr_name = "Darkside Brute";
	cr_which_sheet = 1508; //guard graphic
	cr_icon_adjust = 16;
	cr_what_stat_adjust 0 = 8; //Increase Hardiness by 10
	cr_amount_stat_adjust 0 = 10;
	cr_hp_bonus = 60;
	cr_summon_class = -1;
	cr_start_item 0 = 447; //Darkside Armor, 100%
	cr_start_item_chance 0 = 100;
	cr_start_item 1 = 62; //Steel Greatsword, 100%
	cr_start_item_chance 1 = 100;
	cr_start_item 2 = 114; //Boots, 100%
	cr_start_item_chance 2 = 100;
	cr_start_item 3 = 230; //Strength Elixir, 100%
	cr_start_item_chance 3 = 100;
	cr_start_item 4 = 143; //Steel Helmet, 100%
	cr_start_item_chance 4 = 100;
	cr_start_item 5 = 148; //Gauntlets, 100%
	cr_start_item_chance 5 = 100;
	cr_start_item 6 = 228; //Healing Elixir, 100%
	cr_start_item_chance 6 = 100;
	cr_start_item 7 = 233; //Haste Elixir, 100%
	cr_start_item_chance 7 = 100;

begindefinecreature 238; //darkside shaman
	clear;
	cr_level = 11;
	cr_default_script = "darkmage";
	cr_name = "Darkside Shaman";
	cr_default_attitude = 4;
	cr_which_sheet = 1515;
	cr_icon_adjust = 17;
	cr_small_or_large_template = 0;
	cr_default_strategy = 1;
	cr_summon_class = -1;
	cr_hp_bonus = 60;
	cr_what_stat_adjust 0 = 12; //Up Priest Spells by 13
	cr_amount_stat_adjust 0 = 13;
	cr_what_stat_adjust 1 = 26; //Up Resistance by 3
	cr_amount_stat_adjust 1 = 3;
	cr_what_stat_adjust 2 = 11; //Up Mage Spells by 3
	cr_amount_stat_adjust 2 = 3;
	cr_start_item 0 = 447; //Darkside Armor, 100%
	cr_start_item_chance 0 = 100;
	cr_start_item 1 = 111; //Sandals, 100%
	cr_start_item_chance 1 = 100;
	cr_start_item 2 = 45; //Crude Dagger, 100%
	cr_start_item_chance 2 = 100;
	cr_start_item 3 = 223; //Energy Potion, 50%
	cr_start_item_chance 3 = 50;
	cr_start_item 4 = 435; //Dust of Shadows, 100%
	cr_start_item_chance 4 = 100;
	cr_start_item 5 = 282; //Wand of Bolts, 40%
	cr_start_item_chance 5 = 40;
	cr_start_item 6 = 448; //Flare Wand, 30%
	cr_start_item_chance 6 = 30;
	cr_start_item 7 = 2; //Silver Coins, 15%
	cr_start_item_chance 7 = 15;
	cr_immunities 0 = 50; //50% Fire resistance
	cr_immunities 1 = 50; //50% Cold resistance
	cr_immunities 2 = 50; //50% Magic resistance
	cr_immunities 3 = 50; //50% Mental resistance
	cr_immunities 4 = 10; //10% Poison/Acid resistance
	cr_immunities 5 = 10; //10% Melee resistance

begindefinecreature 239; //Carli
	clear;
	cr_level = 9;
	cr_name = "Carli";
	cr_default_script = "carli";
	cr_default_attitude = 2;
	cr_which_sheet = 509;
	cr_small_or_large_template = 1;
	cr_icon_adjust = 0;
	cr_default_strategy = 1;
	cr_summon_class = -1;
	cr_what_stat_adjust 0 = 7; //Up Thrown Missiles by 4
	cr_amount_stat_adjust 0 = 4;
	cr_what_stat_adjust 1 = 12; //Up Priest Spells by 1
	cr_amount_stat_adjust 1 = 1;
	cr_what_stat_adjust 2 = 7; //Up Magery by 2
	cr_amount_stat_adjust 2 = 2;
	cr_start_item 0 = 314; //Leather Sling, 100%
	cr_start_item_chance 0 = 100;

begindefinecreature 240; //Twisted wolf
	import = 192; //worg
	cr_name = "Twisted Wolf";
	cr_icon_adjust = 1;
	cr_summon_class = -1;
	cr_level = 10;
	cr_immunities 5 = 50; //50% melee resistance
	cr_hp_bonus = 40;

begindefinecreature 241; //Fire Shrub
	clear;
	cr_level = 5;
	cr_name = "Fiery Shrub";
	cr_default_script = "shrub";
	cr_default_attitude = 4;
	cr_which_sheet = 510;
	cr_small_or_large_template = 0;
	cr_species = 10; //plant
	cr_summon_class = -1;

begindefinecreature 242; //Trevahn
	clear;
	cr_level = 12;
	cr_default_script = "trevahn";
	cr_name = "Trevahn";
	cr_default_attitude = 4;
	cr_default_strategy = 0;
	cr_natural_armor = 10;
	cr_hp_bonus = 250;
	cr_which_sheet = 1578; //monk
	cr_small_or_large_template = 0;
	cr_summon_class = -1;
	cr_what_stat_adjust 0 = 0; //Up Strength by 6
	cr_amount_stat_adjust 0 = 6;
	cr_what_stat_adjust 1 = 10; //Up Assassination by 3
	cr_amount_stat_adjust 1 = 3;
	cr_what_stat_adjust 2 = 29; //Up Riposte by 3
	cr_amount_stat_adjust 2 = 3;
	cr_what_stat_adjust 3 = 19; //Up Quick Strike by 4
	cr_amount_stat_adjust 3 = 4;
	cr_what_stat_adjust 4 = 39; //Up Willpower by 10
	cr_amount_stat_adjust 4 = 10;
	cr_what_stat_adjust 4 = 4; //Up Melee Weapons by 5
	cr_amount_stat_adjust 4 = 5;
	cr_start_item 0 = 447; //Darkside Armor, 100%
	cr_start_item_chance 0 = 100;
	cr_start_item 1 = 228; //Healing Elixir, 100%
	cr_start_item_chance 1 = 100;
	cr_start_item 2 = 228; //Healing Elixir, 100%
	cr_start_item_chance 2 = 100;
	cr_start_item 3 = 45; //Crude Dagger, 100%
	cr_start_item_chance 3 = 100;
	cr_immunities 0 = 15; //15% Fire resistance
	cr_immunities 1 = 15; //15% Cold resistance
	cr_immunities 2 = 30; //30% Magic resistance
	cr_immunities 3 = 50; //50% Mental resistance
	cr_immunities 4 = 10; //10% Poison/Acid resistance
	cr_immunities 5 = 15; //15% Melee resistance